<!doctype html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang=""> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8" lang=""> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9" lang=""> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang=""> <!--<![endif]-->
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>任务-我创建的</title>
	<meta name="description" content="Ela Admin - HTML5 Admin Template">
	<meta name="viewport" content="width=device-width, initial-scale=1">



	<link rel="stylesheet" href="/resa/css/normalize.css">
	<link rel="stylesheet" href="/resa/css/bootstrap.min.css">
	<link rel="stylesheet" href="/resa/css/font-awesome.min.css">
	<link rel="stylesheet" href="/resa/css/themify-icons.css">
	<link rel="stylesheet" href="/resa/css/pe-icon-7-filled.css">
	<link rel="stylesheet" href="/resa/css/flag-icon.min.css">
	<!--<link rel="stylesheet" href="/resa/assets/css/cs-skin-elastic.css">-->
	<link rel="stylesheet" href="/resa/css/lib/datatable/dataTables.bootstrap.min.css">

	<link rel="stylesheet" href="/resa/css/style.css">
	<link rel="stylesheet" href="/resa/css/lib/chosen/chosen.min.css">


	<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800' rel='stylesheet' type='text/css'>

	<link rel="stylesheet" href="/resa/css/mytask.css">
	<!-- <script type="text/javascript" src="https://cdn.jsdelivr.net/html5shiv/3.7.3/html5shiv.min.js"></script> -->

	<link href="/resa/css/fileinput.css" media="all" rel="stylesheet" type="text/css"/>

	<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css"  crossorigin="anonymous">
	<!--<link rel="stylesheet" href="/resa/css/all.css"  crossorigin="anonymous">-->
	<link href="/resa/themes/explorer-fas/theme.css" media="all" rel="stylesheet" type="text/css"/>



	<style>


		/*.navbar .navbar-nav li.menu-item-has-children a:before {
                    content: "";
                    position: absolute;
                    top: 23px;
                    right: -90px;
                    width: 8px;
                    height: 8px;
                    border-style: solid;
                    border-width: 1px;
                    border-color: #607d8b #607d8b transparent transparent;
                    -webkit-transform: rotate(45deg);
                            transform: rotate(45deg);
                    -webkit-transition: all .25s ease;
                    transition: all .25s ease; }*/
	</style>
</head>
<body>

<!-- Left Block -->
<div class="row" style="width:100%;height: 100%;">

	<!-- /# column -->
	<div class="col-sm-12" style="padding-right: 0px;   padding-left: 0px;">
		<div class="card" style="border-radius: 0px;">
			<div class="card-header active">
				<div class="stat-icon dib flat-color-4">
					<i class="menu-icon fa fa-user"></i>
				</div>


				&nbsp;<a>我创建的</a>
			</div>
			<div class="card-body" style="padding: 0px;">
				<div class="custom-tab">

					<nav>
						<div class="nav nav-tabs" id="nav-tab" role="tablist">
							<a class="nav-item nav-link active" id="custom-nav-home-tab" data-toggle="tab" href="#custom-nav-home" role="tab" style="color: #6A7074;font-size: 14px;" aria-controls="custom-nav-home" aria-selected="true">活动任务</a>
							<a class="nav-item nav-link" id="custom-nav-profile-tab" data-toggle="tab" href="#custom-nav-profile" role="tab" style="color: #6A7074;font-size: 14px;" aria-controls="custom-nav-profile" >完成任务</a>

						</div>
					</nav>
					<div class="tab-content pl-3 pt-2" id="nav-tabContent" style="background-color: #F0F0F0;">
						<div class="tab-pane fade show active" id="custom-nav-home" role="tabpanel" aria-labelledby="custom-nav-home-tab">
							<div class="embed-responsive embed-responsive-16by9" style="height: 500px;">
								<iframe id="table-data" class="embed-responsive-item" src="/resa/task/task-table.html" ></iframe>
							</div>
						</div>

						<div class="tab-pane fade" id="custom-nav-profile" role="tabpanel" aria-labelledby="custom-nav-profile-tab">

						</div>

					</div>

				</div>
			</div>
		</div>
	</div>
	<!-- /# column -->

	<!--<button type="button" class="btn btn-primary">活动任务</button>
    <button type="button" class="btn btn-success">完成任务</button>-->
</div>


		<script src="/resa/js/lib/data-table/datatables.min.js"></script>
		<script src="/resa/js/lib/data-table/dataTables.bootstrap.min.js"></script>
		<!-- Scripts -->
		<script src="/resa/js/vendor/jquery.min.js"></script>
		<!--<script src="/resa/assets/js/vendor/jquery-2.1.4.min.js"></script>-->
		<script src="/resa/js/popper.min.js"></script>

		<script src="/resa/js/jquery.matchHeight.min.js"></script>
		<script src="/resa/js/main.js"></script>
		<script src="/resa/js/lib/chosen/chosen.jquery.min.js"></script>


		<!--<script src="/resa/assets/js/lib/data-table/dataTables.buttons.min.js"></script>
            <script src="/resa/assets/js/lib/data-table/buttons.bootstrap.min.js"></script>
             <script src="/resa/assets/js/lib/data-table/jszip.min.js"></script>
            <script src="/resa/assets/js/lib/data-table/vfs_fonts.js"></script>
            <script src="/resa/assets/js/lib/data-table/buttons.html5.min.js"></script>
            <script src="/resa/assets/js/lib/data-table/buttons.print.min.js"></script>
            <script src="/resa/assets/js/lib/data-table/buttons.colVis.min.js"></script>
            <script src="/resa/assets/js/init/datatables-init.js"></script>-->

		<script src="/resa/js/plugins/sortable.js" type="text/javascript"></script>
		<script src="/resa/js/fileinput.js" type="text/javascript"></script>
		<script src="/resa/js/locales/fr.js" type="text/javascript"></script>
		<script src="/resa/js/locales/es.js" type="text/javascript"></script>
		<script src="/resa/themes/fas/theme.js" type="text/javascript"></script>
		<script src="/resa/themes/explorer-fas/theme.js" type="text/javascript"></script>

		<script src="/resa/assets/js/bootstrap.min.js"></script>
		<script>

			var i=5;
			jQuery(document).ready(function($) {

				//关闭点击之后下拉菜单关闭
				$("body").on('click','[data-stopPropagation]',function (e) {
					e.stopPropagation();
				});

				$("#task").on('hidden.bs.modal', function (e) {
//	          $("#model-task").contents().find("#people").children("#close").click();
					$("#people").modal('hide')
				});

				$("#task").on('show.bs.modal', function (e) {

				});


				var taskInfo=$(".taskInfo");
				taskInfo.each(function(i,m){
					$(m).click(function(){

						//显示teskinfo 框
						$("#task").modal("toggle");
//				var parent=this.parentNode;
//				console.log(parent)
//				//任务状态
//				var taskStatus=parent.children[0].innerText;
//				$("#taskStatus").text(taskStatus)
						//初始化弹出框数据

					})
				});

				//添加联系人
				$('.chanyuren').click(function(){
					$("#people").modal('toggle')
				})


				$("[data-toggle='popover']").popover();


				//添加描述
				$("#miaoshu").click(function(){
					$("#area").show();
					$("#miaoshu").hide()
				})


				//文件上传
				$("#kv-explorer").fileinput({
					'theme': 'explorer-fas',
					'uploadUrl': '#',
					overwriteInitial: false,
					initialPreviewAsData: true,
//          initialPreview: [
//              "http://lorempixel.com/1920/1080/nature/1",
//              "http://lorempixel.com/1920/1080/nature/2",
//              "http://lorempixel.com/1920/1080/nature/3"
//          ],
//          initialPreviewConfig: [
//              {caption: "nature-1.jpg", size: 329892, width: "120px", url: "{$url}", key: 1},
//              {caption: "nature-2.jpg", size: 872378, width: "120px", url: "{$url}", key: 2},
//              {caption: "nature-3.jpg", size: 632762, width: "120px", url: "{$url}", key: 3}
//          ]
				});


				//#######################表格
				initTable()
				initTable2()
				$(".show-detail-json").click(function(){

					$('#task').modal('toggle')
				})

			});


			//function updataStatus(obj){
			//	console.log($(obj).children(".modeladdress").attr("id"));
			//	//获得对应的模态框id
			//	var myModal_id=$(obj).children(".modeladdress").attr("id");
			//
			//	$("#"+myModal_id).modal("toggle");
			//}
			function initTable(){
				console.log("初始化表格")
				$('#table').DataTable({

					destroy: true,
					iDisplayLength:5,
//        	aoColumns: [
//  	              			{ "data": "id"},
//  	              			{ "data": "status"},
//  	              			{ "data": "title"},
//  	              			{ "data": "people"},
//  	              			{ "data": "endTime"},
//  	              			{ "data": "taskType"}
////  	              			{ "mData": function( source, type, val ){
////  	              				switch (source.isImage) {
////									case '1':
////										return "有图";
////										break;
////									case '0':
////										return "无图";
////										break;
////									}
////  	              			}}
//  	              			]
//        	,	
					language:{
						lengthMenu: '<select class="form-control input-xsmall">' +
								'<option value="1">1</option>' +
								'<option value="5">5</option>' +
								'<option value="10">10</option>' +
								'<option value="20">20</option>' +
								'<option value="30">30</option>' +
								'<option value="40">40</option>' +
								'<option value="50">50</option>' +
								'</select>条记录',
						processing: "载入中...",
						search: '<span class="label label-success">搜索：</span>',
						paginate: {//分页的样式内容。
							previous: "上一页",
							next: "下一页",
							first: "第一页",
							last: "最后",

						},
						sEmptyTable: "表中数据为空",
						zeroRecords: "没有内容",//table tbody内容为空时，tbody的内容。
						//下面三者构成了总体的左下角的内容。
						info: "总共_PAGES_ 页，显示第_START_ 到第 _END_ ，筛选之后得到 _TOTAL_ 条，初始_MAX_ 条 ",//左下角的信息显示，大写的词为关键字。
						infoEmpty: "0条记录",//筛选为空时左下角的显示。
						infoFiltered: "",//筛选之后的左下角筛选提示，
					}


				});




			}

			function initTable2(){
				console.log("初始化表格")
				$('#table2').DataTable({

					destroy: true,
					iDisplayLength:5,
//        	aoColumns: [
//  	              			{ "data": "id"},
//  	              			{ "data": "status"},
//  	              			{ "data": "title"},
//  	              			{ "data": "people"},
//  	              			{ "data": "endTime"},
//  	              			{ "data": "taskType"}
////  	              			{ "mData": function( source, type, val ){
////  	              				switch (source.isImage) {
////									case '1':
////										return "有图";
////										break;
////									case '0':
////										return "无图";
////										break;
////									}
////  	              			}}
//  	              			]
//        	,	
					language:{
						lengthMenu: '<select class="form-control input-xsmall">' +
								'<option value="1">1</option>' +
								'<option value="5">5</option>' +
								'<option value="10">10</option>' +
								'<option value="20">20</option>' +
								'<option value="30">30</option>' +
								'<option value="40">40</option>' +
								'<option value="50">50</option>' +
								'</select>条记录',
						processing: "载入中...",
						search: '<span class="label label-success">搜索：</span>',
						paginate: {//分页的样式内容。
							previous: "上一页",
							next: "下一页",
							first: "第一页",
							last: "最后",

						},
						sEmptyTable: "表中数据为空",
						zeroRecords: "没有内容",//table tbody内容为空时，tbody的内容。
						//下面三者构成了总体的左下角的内容。
						info: "总共_PAGES_ 页，显示第_START_ 到第 _END_ ，筛选之后得到 _TOTAL_ 条，初始_MAX_ 条 ",//左下角的信息显示，大写的词为关键字。
						infoEmpty: "0条记录",//筛选为空时左下角的显示。
						infoFiltered: "",//筛选之后的左下角筛选提示，
					}


				});




			}
			//data-toggle="modal" data-target="#task"
		</script>
</body>
</html>
